package xl.utils
{
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;

	public class UtilsGC
	{
		public function UtilsGC()
		{
		}
		
		public static function clearChildren($parent:DisplayObjectContainer):void
		{
			if($parent)
			{
				while($parent.numChildren)
					$parent.removeChildAt(0);				
			}

		}
		
		public static function clearObject($obj:DisplayObject):void
		{
			if($obj && $obj.parent)
				$obj.parent.removeChild($obj);
		}
	}
}